package com.bolt.report.business.modules.link.entity;

import com.bolt.support.spring.jpa.entity.BaseUuidAuditingEntity;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.*;

/**
 * Auto Generate Javadoc
 *
 * @author 日期:2023-03-30 16:17:08
 *         超链接配置表
 **/
@Access(AccessType.FIELD)
@Entity
@Table(name = "bolt_report_link")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Data
@DynamicInsert
@FieldDefaults(level = AccessLevel.PRIVATE)
public class ReportLinkEntity extends BaseUuidAuditingEntity {
    private static final long serialVersionUID = 1L;


    /**
     * 报表id
     */
    @Column(name = "report_id", length = 32, columnDefinition = "报表id")
    private String reportId;


    /**
     * 参数
     */
    @Column(name = "parameter", length = 65535, columnDefinition = "参数")
    private String parameter;


    /**
     * 弹出方式（0 当前页面 1 新窗口）
     */
    @Column(name = "eject_type", length = 1, columnDefinition = "弹出方式（0 当前页面 1 新窗口）")
    private Integer ejectType;


    /**
     * 链接名称
     */
    @Column(name = "link_name", length = 255, columnDefinition = "链接名称")
    private String linkName;


    /**
     * 请求方法0-get,1-post
     */
    @Column(name = "http_method", length = 1, columnDefinition = "请求方法0-get,1-post")
    private String httpMethod;


    /**
     * 链接方式(0 网络报表 1 网络连接 2 图表联动)
     */
    @Column(name = "link_type", length = 1, columnDefinition = "链接方式(0 网络报表 1 网络连接 2 图表联动)")
    private String linkType;


    /**
     * 外网api
     */
    @Column(name = "http_url", length = 1000, columnDefinition = "外网api")
    private String httpUrl;


    /**
     * 联动图表的ID
     */
    @Column(name = "link_chart_id", length = 50, columnDefinition = "联动图表的ID")
    private String linkChartId;


    /**
     * 表达式
     */
    @Column(name = "script", length = 255, columnDefinition = "表达式")
    private String script;


    /**
     * 条件
     */
    @Column(name = "requirement", length = 255, columnDefinition = "条件")
    private String requirement;


}